import app from  './app'
import router from './router'
import Antd from 'ant-design-vue';
import * as Icons from '@ant-design/icons-vue'
import '@fortawesome/fontawesome-free/css/all.css'
import './styles/index.less'
import {store,state,action} from './store'
import {loadScript} from './utils/index'
import request from '@/utils/axios'

import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn';
dayjs.locale('zh-cn')
import './component'
import './directive'
import VueMarkdownEditor from '@kangc/v-md-editor'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import Prism from 'prismjs';
VueMarkdownEditor.use(vuepressTheme, {
    Prism
})
app.use(VueMarkdownEditor)
app.config.globalProperties.$script = loadScript
app.config.globalProperties.$request = request
app.config.globalProperties.$action = action
app.use(Antd)
window.$app = app
for (const i in Icons) {
    app.component(i, Icons[i]);
}
app.provide(store,state)
action.getSystemConfig().then(()=>{
    app.use(router)
    app.mount('#app')
})


